package com.vvlive.caibao.smartcity.utils.sort;

import java.util.Comparator;
import java.util.Date;

public class Name implements Comparator<Object> {

	private String first;
	private String whole;
	private String original;

	public Name() {
	}

	public Name(String first, String whole, String original) {
		this.first = first;
		this.whole = whole;
		this.original = original;
	}

	public String getFirst() {
		return first;
	}

	public void setFirst(String first) {
		this.first = first;
	}

	public String getWhole() {
		return whole;
	}

	public void setWhole(String whole) {
		this.whole = whole;
	}

	public String getOriginal() {
		return original;
	}

	public void setOriginal(String original) {
		this.original = original;
	}

	@Override
	public String toString() {
		return "Name [first=" + first + ", whole=" + whole + ", original="
				+ original + "]";
	}

	@Override
	public int compare(Object o1, Object o2) {
		return ((Date)o2).compareTo((Date)o1);
	}

}
